
<div class="col-sm-12">
	<div class="box margin-middle max-width">
		<!-- BOX-BODY -->
		<div class="box-body">
			{{#bs-form formLayout=formLayout model=drugModel invalid=(action "invalid")}}
			<div class="row">
				<div class="col-xs-12">
					<p class="user-add-btn">
						{{#if detailEdit}}
						{{else}}
							{{#ui/form-function editAction="detailEditClick" detailEditClick="detailEditClick"
							removeAction="delById" delById="delById" }}
							{{/ui/form-function}}
						{{/if}}
					</p>
				</div>

			<!-- 列表详细介绍 -->
				<div class="col-xs-12 nopadding-left">
					<div class="col-xs-12 nopadding-horizontal mt20">
						<div class="col-sm-12 nopadding-left bott cccc padding-bottom30">
								<div class="col-sm-6 nopadding-horizontal pull-left">
										{{#ui/img-intergration name="headImg" hasUploader=true imgSrc=drugModel.avatarUrl height=100 width=100 margin-left=0 uploadUrl=uploadUrl uploadSucc="uploadSucc" uploadFail="uploadFailImg" businessType=constants.uploadBusinessType_headimg as |component|}}
												<div class="pull-left photo-title {{if detailEdit '' 'hidden'}}">
														<div class="tip photo-title-color">
																请上传药品图片！
														</div>
														<div class="photo-footer">
																<div class="button pull-left photo-footer-color" {{action 'avatarUpload' target=component on="click"}}>
																		上传图片
																</div>
														</div>
												</div>
										{{/ui/img-intergration}}
								</div>
						</div>
						<div class="line">
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">商品名称：</span>
								{{#if detailEdit}}
									{{bs-form-element property="name" class="inline-block form-input-group label-normal" controlType="name" placeholder="必填"}}
								{{else}}
									<div class="input-group-content">{{drugInfo.name}}</div>
								{{/if}}
							</div>
						</div>
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">通用名称：</span>
								{{#if detailEdit}}
									{{bs-form-element property="generalName" placeholder='通用名称' class="inline-block form-input-group label-normal" controlType="generalName" }}
								{{else}}
									<div class="input-group-content">{{drugInfo.generalName}}</div>
								{{/if}}
							</div>
						</div>
					</div>
						<div class="col-xs-12 col-sm-6"	>
				      <div class="form-input-group">
				        <span class="input-group-addon">药品类别：</span>
									{{#if detailEdit}}
										{{#if id}}
											{{#bs-form-element class="inline-block form-input-group" controlType="drugType"  property="drugType" }}
												{{callbusi/dict-selector class="inline-block" groupCode=constants.drugType curDict=drugInfo.drugType
													showName=drugInfo.drugType.typename dictSelect="drugTypeSelect" preselected=false}}
											{{/bs-form-element }}
										{{else}}
											{{#bs-form-element class="inline-block form-input-group" controlType="drugType"  property="drugType" }}
												{{callbusi/dict-selector class="inline-block" groupCode=constants.drugType curDict=drugInfo.drugType
												showName='药品类别' dictSelect="drugTypeSelect" preselected=false}}
											{{/bs-form-element }}
										{{/if}}
									{{else}}
										<div class="input-group-content">{{drugInfo.drugType.typename }}</div>
									{{/if}}
							</div>
						</div>



						<div class="col-xs-12 col-sm-6"	>
							<div class=" form-input-group">
								<div class="input-group-addon">生产厂家：</div>
									{{#if detailEdit}}
  									{{bs-form-element property="drugFactory" class="inline-block form-input-group label-normal" controlType="drugFactory" placeholder=drugInfo.drugFactory placeholder="必填"}}
									{{else}}
										<div class="input-group-content">{{drugInfo.drugFactory}}</div>
									{{/if}}
							</div>
						</div>
						<div class="col-xs-12 col-sm-6"	>
				      <div class="form-input-group">
								<span class="input-group-addon">制剂：</span>
									{{#if detailEdit}}
										{{#bs-form-element class="inline-block form-input-group" controlType="drugForm"  property="drugForm" }}
												{{#power-select class="input-group-content" placeholder='必填' options=drugFormTypeList0  selected=drugInfo.drugForm searchField="name"
												noMatchesMessage="没有相关内容"	allowClear=false	onchange=(action "drugFormSelect" ) as |drugFormType|}}
													{{drugFormType.name}}
												{{/power-select}}
											{{/bs-form-element}}
									{{else}}
										<div class="input-group-content">{{drugInfo.drugForm.name}}</div>
									{{/if}}
							</div>
						</div>

						<div class="col-xs-12 col-sm-6"	>
				      <div class="form-input-group">
				        <span class="input-group-addon">剂型：</span>
									{{#if detailEdit}}
										{{#if id}}
											{{#bs-form-element class="inline-block form-input-group" controlType="drugSpec"  property="drugSpec" }}
												{{callbusi/dict-selector class="inline-block" groupCode=constants.drugSpec curDict=drugInfo.drugSpec
													showName=drugInfo.drugSpec.typename dictSelect="drugSpecSelect"}}
											{{/bs-form-element }}
										{{else}}
											{{#bs-form-element class="inline-block form-input-group" controlType="drugSpec"  property="drugSpec" }}
												{{callbusi/dict-selector class="inline-block" groupCode=constants.drugSpec curDict=drugInfo.drugSpec
													showName='必填' dictSelect="drugSpecSelect" preselected=false}}
											{{/bs-form-element }}
										{{/if}}
									{{else}}
										<div class="input-group-content">{{drugInfo.drugSpec.typename }}</div>
									{{/if}}
							</div>
						</div>

						<div class="col-xs-12 col-sm-6"	>
				      <div class="form-input-group">
				        <span class="input-group-addon">剂量单位：</span>
									{{#if detailEdit}}
										{{#if id}}
											{{#bs-form-element class="inline-block form-input-group" controlType="unit"  property="unit" }}
													{{#power-select class="input-group-content" placeholder=drugInfo.unit options=unitList  selected=defaultUnit searchField="name"
													noMatchesMessage="没有相关内容"	allowClear=false	onchange=(action "selectUnit" ) as |unit|}}
														{{unit.name}}
													{{/power-select}}
											{{/bs-form-element }}
										{{else}}
											{{#bs-form-element class="inline-block form-input-group" controlType="unit"  property="unit" }}
													{{#power-select class="input-group-content" placeholder='' options=unitList  selected=defaultUnit searchField="name"
													noMatchesMessage="没有相关内容"	allowClear=false	onchange=(action "selectUnit" ) as |unit|}}
														{{unit.name}}
													{{/power-select}}
											{{/bs-form-element }}
										{{/if}}
									{{else}}
										<div class="input-group-content">{{drugInfo.unit}}</div>
									{{/if}}
							</div>
						</div>

						<div class="col-xs-12 col-sm-6"	>
							<div class=" form-input-group">
								<div class="input-group-addon">最小规格：</div>
									{{#if detailEdit}}
										{{#if id}}
											{{bs-form-element property="spec" class="inline-block form-input-group label-normal" controlType="spec" placeholder=drugInfo.spec}}
										{{else}}
  										{{bs-form-element property="spec" class="inline-block form-input-group label-normal" controlType="spec" placeholder=''}}
										{{/if}}
									{{else}}
										<div class="input-group-content">{{drugInfo.spec}}</div>
									{{/if}}
							</div>
						</div>

						<div class="col-xs-12 col-sm-6"	>
							<div class=" form-input-group">
								<div class="input-group-addon">分药类型：</div>
									{{#if detailEdit}}
										{{#bs-form-element class="inline-block form-input-group" controlType="printTypeValue"  property="printTypeValue" }}
										{{#power-select class="input-group-content" placeholder='必填' options=printList  selected=drugModel.printTypeValue searchField="name"
										noMatchesMessage="没有相关内容"	allowClear=false	onchange=(action "selectPrint" ) as |print|}}
											{{print.name}}
										{{/power-select}}
										{{/bs-form-element }}
									{{else}}
										<div class="input-group-content">{{drugInfo.printTypeName}}</div>
									{{/if}}
							</div>
						</div>

						<div class="col-xs-12 col-sm-6"	>
							<div class=" form-input-group">
								<div class="input-group-addon">备注：</div>
									{{#if detailEdit}}
  									{{bs-form-element property="remark" class="inline-block form-input-group label-normal" controlType="remark" placeholder=''}}
									{{else}}
										<div class="input-group-content">{{drugInfo.remark}}</div>
									{{/if}}
							</div>
						</div>

					</div>
				</div>
			<!-- 列表详细介绍 -->
		</div>
			<div class="text-center padding-top30">
					<p class="text-center user-add-btn" style="display:inline-block;margin:0 auto!important ">
					{{#if detailEdit}}
						{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-check"  text='保存' clickAction="saveDrug" saveDrug="saveDrug"}}
						{{/ui/mix-button}}
						{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-mail-reply"  text='取消'  clickAction="detailCancel" detailCancel="detailCancel" }}
						{{/ui/mix-button}}
					{{else}}
					{{/if}}
					</p>
			</div>
			{{/bs-form}}
		</div>
		<!-- /BOX-BODY -->
	</div>
</div>

{{#if showpopInvitePassModal}}
	{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")
	submitAction=(action "cancelPassSubmit" drugInfo)}}
		{{#bs-modal-header}}
			<h3 class="modal-title">删除提示</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
			<h4 class="modal-title">是否删除该条记录？</h4>
		{{/bs-modal-body}}

		{{#bs-modal-footer as |footer|}}
			{{#bs-button action=(action "cancelPassSubmit" drugInfo) type="primary" disabled=prepaidDisabled}}确定{{/bs-button}}
			{{#bs-button action=(action "invitation") type="default"}}取消{{/bs-button}}
		{{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
